# include <iostream>
# include <iomanip>
# include <fstream>
# include <string>

using namespace std;
int main ()
{
	int Temp,Pres,Time,ID;
	char tempRejection,presRejection,timeRejection;
	int t,p,d,count;
	string name;

	ifstream InData;

	//**************

	cout<<"Please, Enter The Name Of The File Containig Batch Information : ";
	cin>>name;

	InData.open(name.c_str() );

	if ( !InData )
	{
		cout<<"Sorry, Can Not Open The File .."<<endl<<endl;

		return 1;
	}

	cout<<setw(7)<<"ID   "<<setw(11)<<left<<"  Temp"<<setw(11)<<left<<"pressure"<<setw(9)<<left<<"   Time"<<"Reject Reason"<<endl;
	cout<<setw(7)<<"  "<<setw(12)<<"150-170"<<setw(12)<<"60-70"<<setw(11)<<"2-2.5"<<endl;



	//**************

	InData>>ID;
	count = 0;
	t = 0;
	d = 0;
	p = 0;

	while ( InData )
	{
		count++;
		InData>>Temp>>Pres>>Time;
		
		if ( !InData )
		{
			cout<<"Sorry, Can Not Read From File."<<endl;

		}	return 1;

		// Tempreture Rejection..

		if ( Temp >= 150 && Temp <= 170 )
		{
			tempRejection = ' ';
		}
		else
		{
			t++;
			tempRejection = 'T';
		}

		// Pressure Rejection..

		if ( Pres >= 60 && Pres <= 70 )
		{
			presRejection = ' ';
		}
		else
		{
			p++;
			presRejection = 'P';
		}

		// Time Rejection..

		if ( Time >= 2 && Time <= 2.5 )
		{
			timeRejection = ' ';
		}
		else
		{
			d++;
			timeRejection = 'D';
		}

		cout<<setw(7)<<left<<ID<<
		InData>>ID;

	}	exit (0);


	//***************



	return 0;

}
